home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / perl5 / URI / http.pm < prev    next >
Text File  |  2008-04-02  |  405b  |  26 lines

  1. package URI::http;
  2.  
  3. require URI::_server;
  4. @ISA=qw(URI::_server);
  5.  
  6. use strict;
  7.  
  8. sub default_port { 80 }
  9.  
  10. sub canonical
  11. {
  12.     my $self = shift;
  13.     my $other = $self->SUPER::canonical;
  14.  
  15.     my $slash_path = defined($other->authority) &&
  16.         !length($other->path) && !defined($other->query);
  17.  
  18.     if ($slash_path) {
  19.     $other = $other->clone if $other == $self;
  20.     $other->path("/");
  21.     }
  22.     $other;
  23. }
  24.  
  25. 1;
  26.